# -*- coding: utf8 -*-


EN_MSGS_ = {
  # base.html
  "MSG_BP_REQUEST_REGISTRY" : "China earthquake request registry system",
  "MSG_BP_PROFILE" : "Profile",
  "MSG_BP_CREATE_PROFILE" : "Create Profile",
  "MSG_BP_SEARCH" : "Search",
  "MSG_BP_CONTACT_US" : "Contact Us",
  # home_page.html
  "MSG_HP_TITLE" : "China earthquake request registry system",
  "MSG_HP_CREATE_REQUEST" : "Create Request",
  "MSG_HP_WILL_VERIFY_REQUEST" : "We will verify the identity of requestor befor submitting the request.",
  "MSG_HP_NAME" : "Name",
  "MSG_HP_DESCRIPTION" : "Description",
  "MSG_HP_LOCATION" : "Location",
  "MSG_HP_ESTIMATED_COST" : "Estimated Cost",
  "MSG_HP_COST" : "Cost",
  "MSG_HP_SOURCE" : "Source",
  "MSG_HP_NUM_PLEDGES" : "Num Pledges",
  "MSG_HP_NUM_ORDERS" : "Num Orders",
  "MSG_HP_CREATOR" : "Creator",
  "MSG_HP_CREATION_DATE" : "Creation Date",
  "MSG_HP_FUNDING_ORDERS" : "Orders needs funding",
  "MSG_HP_OPEN_ORDERS" : "Open orders",
  "MSG_HP_ORDERS_IN_SHIPMENT" : "Orders in shipment",
  "MSG_HP_ORDERS_FULFILLED" : "Orders fulfilled",
  "MSG_HP_UNVERIFIED_ORDERS" : "Unverified orders",
  "MSG_HP_MORE" : "More",
  # create_profile.html
  "MSG_CP_CREATE_PROFILE" : "Create Profile",
  "MSG_CP_DONOR_PROFILE" : "Donor Profile",
  "MSG_CP_MANUFACTURER_PROFILE" : "Manufacturer Profile",
  "MSG_CP_NAME" : "Name",
  "MSG_CP_DESCRIPTION" : "Description",
  "MSG_CP_EMAIL" : "Email",
  "MSG_CP_PHONE" : "Phone",
  "MSG_CP_ADDRESS" : "Address",
  "MSG_CP_WEBSITE" : "Website",
  # create_user.html
  "MSG_CU_CREATE_USER" : "Create User",
  "MSG_CU_CHOOSE_USERNAME" : "Choose a username",
  "MSG_CU_CHANGE_USER_TEXT" : "You can change another nickname if you don't want to use your Google account name.",
  "MSG_CU_USERNAME" : "Username",
  "MSG_CU_USERNAME_TAKEN" : "is already taken in the system. Please choose another name.",
  "MSG_CU_SELF_DESCRIPTION" : "Self description",
  # profile.html
  "MSG_PP_VIEW_APPROVALS" : "View Approvals (Admins only)",
  "MSG_PP_USER_PROFILE" : "User Profile",
  "MSG_PP_DESCRIPTION" : "Description",
  "MSG_PP_ROLES" : "Roles",
  "MSG_PP_APPLY" : "Apply",
  "MSG_PP_PENDING" : "Pending Approval",
  "MSG_PP_ACTIVE" : "Active",
  "MSG_PP_DONOR_PROFILES" : "Donor Profiles",
  "MSG_PP_APPLY_DONOR_PROFILE" : "Apply for donor profile.",
  "MSG_PP_MANUFACTURER_PROFILES" : "Manufacturer Profiles",
  "MSG_PP_APPLY_MANUFACTURER_PROFILE" : "Apply for manufacturer profile.",
  # approvals.html
  "MSG_AP_REQUEST_APPROVAL" : "Request Approval",
  "MSG_AP_SHOW_PENDING" : "Show Pending",
  "MSG_AP_SHOW_APPROVED" : "Show Approved",
  "MSG_AP_SHOW_DENIED" : "Show Denied",
  "MSG_AP_REQUIRE_ACTION" : "Following entries require your action",
  "MSG_AP_ENTRIES_HAVE_BEEN" : "Following entires have been",
  "MSG_AP_APPROVED" : "approved",
  "MSG_AP_DENIED" : "denied",
  "MSG_AP_USER_ROLES" : "User Roles",
  "MSG_AP_REQUESTS_TO_BE" : "requets to be",
  "MSG_AP_REASON" : "Reason",
  "MSG_AP_DONOR_PROFILE" : "Donor Profiles",
  "MSG_AP_MANUFACTURER_PROFILE" : "Manufacturer Profiles",
  "MSG_AP_APPROVE" : "Approve",
  "MSG_AP_DENY" : "Deny",
  # donor_profile.html
  "MSG_DP_PENDING" : "pending approval",
  "MSG_DP_DENIED" : "denied",
  "MSG_DP_CREATOR" : "Creator",
  "MSG_DP_DESCRIPTION" : "Description",
  "MSG_DP_CONTACT_INFO" : "Contact information",
  "MSG_DP_EMAIL" : "Email",
  "MSG_DP_PHONE" : "Phone",
  "MSG_DP_ADDRESS" : "Address",
  "MSG_DP_WEBSITE" : "Website",
  # manufacturer_profile.html
  "MSG_MP_PENDING" : "pending approval",
  "MSG_MP_DENIED" : "denied",
  "MSG_MP_CREATOR" : "Creator",
  "MSG_MP_DESCRIPTION" : "Description",
  "MSG_MP_CONTACT_INFO" : "Contact information",
  "MSG_MP_EMAIL" : "Email",
  "MSG_MP_PHONE" : "Phone",
  "MSG_MP_ADDRESS" : "Address",
  "MSG_MP_WEBSITE" : "Website",
  # create_request.html
  "MSG_CR_ITEMNAME" : "Item Name",
  "MSG_CR_ITEMNAME_HINT" : "Use one sentense to describe your requests",  
  "MSG_CR_ITEMDESC" : "Item Description",
  "MSG_CR_COST" : "Estimate Cost",
  "MSG_CR_SOURCE" : "Source",
  "MSG_CR_LOCATION" : "Location",
  "MSG_CR_CONTACT" : "Contact",
  "MSG_CR_CONTACT_HINT" : "Telephone/Cellphone number, etc.",  
  "MSG_CR_SUBMIT" : "Submit",
  # create_pledge.html
  "MSG_CP_AMOUNT" : "Amount",
  "MSG_CP_UNIT" : "CNY",
  "MSG_CP_DESC" : "Description",
  "MSG_CP_SELECTDONOR" : "Select a donator",
  # create_order.html
  "MSG_CO_DESC" : "Description",
  "MSG_CO_SELECTPROFILE" : "Select a manufacturer",
  # post_message.html
  "MSG_PM_BODY" : "Message",
  "MSG_PM_SUBMIT" : "Submit",
  # view_request.html
  "MSG_VR_REQUESTDESC" : "Request Description",
  "MSG_VR_CREATOR" : "Creator",
  "MSG_VR_RELATEDMSG" : "Related Messages",
  "MSG_VR_CREATEMSG" : "Add a new message",  
  "MSG_VR_PLEDGES" : "Available Pledges",
  "MSG_VR_CREATEPLEDGE" : "Add a new pledge",
  "MSG_VR_ORDERS" : "Current Orders",
  "MSG_VR_CREATEORDER" : "Add a new order",
  "MSG_VR_SUBSCRIBERS" : "Subscribers",  
  "MSG_VR_SUBSCRIBE" : "Subscribe",
  "MSG_VR_UNSUBSCRIBE" : "Unsubscribe",
  # view_pledge.html
  # view_order.html
  # view_message.html (TODO)
  # common messages
  "MSG_CMN_SUBMIT" : "Submit",
  "MSG_CMN_CANCEL" : "Cancel",
  "MSG_CMN_EDIT" : "Edit",
  "MSG_CMN_DELETE" : "Delete",
  "MSG_CMN_DATE" : "Date",
  "MSG_CMN_CURRENCY_UNIT" : "CNY",
  # page names in the navigation bar
  "approvals.html" : "approvals",
  "create_order.html" : "create order",
  "create_pledge.html" : "create pledge",
  "create_profile.html" : "create profile",
  "create_request.html" : "create request",
  "create_user.html" : "create user",
  "donor_profile.html" : "donor profile",
  "home_page.html" : "home page",
  "manufacturer_profile.html" : "manufacturer profile",
  "post_message.html" : "post message",
  "profile.html" : "profile",
  "view_order.html" : "view order",
  "view_pledge.html" : "view pledge",
  "view_request.html" : "view request",      
  # others
  "Login" : "Login",
  "Logout": "Logout",
  "system admin": "system admin",
  "request moderator": "request moderator",
  "donor moderator": "donor moderator",
  "manufacturer moderator": "manufacturer moderator",
  "unknown": "unknown",
  "pending": "pending",
  "approved": "approved",
  "denied": "denied",
  "days ago" : "days ago",
  "hours ago" : "hours ago",
  "minutes ago" : "minutes ago",
  "seconds ago" : "seconds ago",
}


ZH_CN_MSGS_ = {
  # base.html
  "MSG_BP_REQUEST_REGISTRY" : "救灾物资认购平台",
  "MSG_BP_PROFILE" : "档案",
  "MSG_BP_CREATE_PROFILE" : "建立档案",
  "MSG_BP_SEARCH" : "搜索",
  "MSG_BP_CONTACT_US" : "联系我们",
  # home_page.html
  "MSG_HP_TITLE" : "救灾物资认购平台",
  "MSG_HP_CREATE_REQUEST" : "创建物资条目",
  "MSG_HP_WILL_VERIFY_REQUEST" : "我们将审核发布者(机构)的身份是否真实，只有经过确认后才能提交需求。",
  "MSG_HP_NAME" : "物资条目",
  "MSG_HP_DESCRIPTION" : "描述",
  "MSG_HP_LOCATION" : "所在地",
  "MSG_HP_ESTIMATED_COST" : "估计(人民币)",
  "MSG_HP_COST" : "价值(人民币)",
  "MSG_HP_SOURCE" : "提交方",
  "MSG_HP_NUM_PLEDGES" : "捐助方",
  "MSG_HP_NUM_ORDERS" : "提供方",
  "MSG_HP_CREATOR" : "提交者",
  "MSG_HP_CREATION_DATE" : "发布时间",
  "MSG_HP_FUNDING_ORDERS" : "需要资助的物资",
  "MSG_HP_OPEN_ORDERS" : "需要采购的物资",
  "MSG_HP_ORDERS_IN_SHIPMENT" : "正在运送的物资项 ",
  "MSG_HP_ORDERS_FULFILLED" : "送达完毕的物资项",
  "MSG_HP_UNVERIFIED_ORDERS" : "未确认的物资项",
  "MSG_HP_MORE" : "更多",
  "MSG_HP_DONORS" : "资助机构",
  "MSG_HP_MANUFACTURERS" : "供货厂家",
  # create_profile.html
  "MSG_CP_CREATE_PROFILE" : "建立档案",
  "MSG_CP_DONOR_PROFILE" : "资助方档案",
  "MSG_CP_MANUFACTURER_PROFILE" : "供货厂家档案",
  "MSG_CP_NAME" : "名称",
  "MSG_CP_DESCRIPTION" : "描述",
  "MSG_CP_EMAIL" : "电子邮件",
  "MSG_CP_PHONE" : "电话",
  "MSG_CP_ADDRESS" : "地址",
  "MSG_CP_WEBSITE" : "网址",
  # create_user.html
  "MSG_CU_CREATE_USER" : "建立用户",
  "MSG_CU_CHOOSE_USERNAME" : "填写用户名",
  "MSG_CU_CHANGE_USER_TEXT" : "如果你不想使用你的Google账号的用户名，你可填写另外一个。",
  "MSG_CU_USERNAME" : "用户名",
  "MSG_CU_USERNAME_TAKEN" : "已被使用。",
  "MSG_CU_SELF_DESCRIPTION" : "个人介绍",
  # profile.html
  "MSG_PP_VIEW_APPROVALS" : "批准物资条目(限管理员)",
  "MSG_PP_USER_PROFILE" : "用户档案",
  "MSG_PP_DESCRIPTION" : "描述",
  "MSG_PP_ROLES" : "权限",
  "MSG_PP_APPLY" : "申请",
  "MSG_PP_PENDING" : "待批准",
  "MSG_PP_ACTIVE" : "有效",
  "MSG_PP_DONOR_PROFILES" : "资助方档案",
  "MSG_PP_APPLY_DONOR_PROFILE" : "申请资助方资格并建立档案",
  "MSG_PP_MANUFACTURER_PROFILES" : "供货厂家档案",
  "MSG_PP_APPLY_MANUFACTURER_PROFILE" : "申请供货厂家资格并建立档案",
  # approvals.html
  "MSG_AP_REQUEST_APPROVAL" : "物资需求批准",
  "MSG_AP_SHOW_PENDING" : "待批准条目",
  "MSG_AP_SHOW_APPROVED" : "已批准条目",
  "MSG_AP_SHOW_DENIED" : "被驳回条目",
  "MSG_AP_REQUIRE_ACTION" : "以下条目需要您的批准",
  "MSG_AP_ENTRIES_HAVE_BEEN" : "以下条目已经被",
  "MSG_AP_APPROVED" : "批准",
  "MSG_AP_DENIED" : "驳回",
  "MSG_AP_USER_ROLES" : "用户权限",
  "MSG_AP_REQUESTS_TO_BE" : "欲申请成",
  "MSG_AP_REASON" : "申请原因",
  "MSG_AP_DONOR_PROFILE" : "资助方档案",
  "MSG_AP_MANUFACTURER_PROFILE" : "供货厂家档案",
  "MSG_AP_APPROVE" : "待批",
  "MSG_AP_DENY" : "驳回",
  # donor_profile.html
  "MSG_DP_PENDING" : "待批准",
  "MSG_DP_DENIED" : "被驳回",
  "MSG_DP_CREATOR" : "创建人",
  "MSG_DP_DESCRIPTION" : "描述",
  "MSG_DP_CONTACT_INFO" : "联系方式",
  "MSG_DP_EMAIL" : "电子邮件",
  "MSG_DP_PHONE" : "电话",
  "MSG_DP_ADDRESS" : "地址",
  "MSG_DP_WEBSITE" : "网址",
  # manufacturer_profile.html
  "MSG_MP_PENDING" : "待批准",
  "MSG_MP_DENIED" : "被驳回",
  "MSG_MP_CREATOR" : "创建人",
  "MSG_MP_DESCRIPTION" : "描述",
  "MSG_MP_CONTACT_INFO" : "联系方式",
  "MSG_MP_EMAIL" : "电子邮件",
  "MSG_MP_PHONE" : "电话",
  "MSG_MP_ADDRESS" : "地址",
  "MSG_MP_WEBSITE" : "网址",
  # create_request.html
  "MSG_CR_ITEMNAME" : "标题",
  "MSG_CR_ITEMNAME_HINT" : "请用一句话描述您的需求",  
  "MSG_CR_ITEMDESC" : "详细说明和备注",
  "MSG_CR_COST" : "预算",
  "MSG_CR_SOURCE" : "消息来源",
  "MSG_CR_LOCATION" : "详细地址",
  "MSG_CR_CONTACT" : "联系方式",
  "MSG_CR_CONTACT_HINT" : "电话、手机号码等",  
  "MSG_CR_SUBMIT" : "提交",
  # create_pledge.html
  "MSG_CP_AMOUNT" : "金额",
  "MSG_CP_UNIT" : "元",
  "MSG_CP_DESC" : "说明",
  "MSG_CP_SELECTDONOR" : "选择捐赠者",
  # create_order.html
  "MSG_CO_DESC" : "说明",
  "MSG_CO_SELECTPROFILE" : "选择供应商",
  # post_message.html
  "MSG_PM_BODY" : "消息内容",
  "MSG_PM_SUBMIT" : "发布",
  # view_request.html
  "MSG_VR_REQUESTDESC" : "需求详情",
  "MSG_VR_CREATOR" : "创建者",  
  "MSG_VR_RELATEDMSG" : "留言",
  "MSG_VR_CREATEMSG" : "我要留言",
  "MSG_VR_PLEDGES" : "捐赠",
  "MSG_VR_CREATEPLEDGE" : "我要捐赠",
  "MSG_VR_ORDERS" : "订单",
  "MSG_VR_CREATEORDER" : "新增订单",
  "MSG_VR_SUBSCRIBERS" : "订阅者",
  "MSG_VR_SUBSCRIBE" : "订阅",
  "MSG_VR_UNSUBSCRIBE" : "取消订阅",
  # common messages
  "MSG_CMN_SUBMIT" : "提交",
  "MSG_CMN_CANCEL" : "取消",
  "MSG_CMN_EDIT" : "编辑",
  "MSG_CMN_DELETE" : "删除",
  "MSG_CMN_DATE" : "日期",
  "MSG_CMN_CURRENCY_UNIT" : "元",  
  # page names in the navigation bar
  "approvals.html" : "审批",
  "create_order.html" : "创建订单",
  "create_pledge.html" : "创建捐赠",
  "create_profile.html" : "创建档案",
  "create_request.html" : "创建需求",
  "create_user.html" : "创建用户",
  "donor_profile.html" : "捐赠者档案",
  "home_page.html" : "首页",
  "manufacturer_profile.html" : "供应商档案",
  "post_message.html" : "发布留言",
  "profile.html" : "档案",
  "view_order.html" : "查看订单",
  "view_pledge.html" : "查看捐赠",
  "view_request.html" : "查看需求",      
  # others
  "Login" : "登录",
  "Logout": "退出",
  "system admin": "系统管理员",
  "request moderator": "物资需求发布管理员",
  "donor moderator": "资助管理员",
  "manufacturer moderator": "生产供货管理员",
  "unknown": "未知",
  "pending": "待批准",
  "approved": "已批准",
  "denied": "被驳回",
  "days ago" : "天前",
  "hours ago" : "小时前",
  "minutes ago" : "分钟前",
  "seconds ago" : "秒前",
}

CURRENT_MSGS_ = None

def Init(hl):
  global CURRENT_MSGS_
  if hl == 'en':
    CURRENT_MSGS_ = EN_MSGS_
  elif hl == 'zh-CN' or hl == 'zh-cn':
    CURRENT_MSGS_ = ZH_CN_MSGS_
  else:
    CURRENT_MSGS_ = ZH_CN_MSGS_  # We return zh-CN for default

def GetMsgs():
  return CURRENT_MSGS_

# Message translations are added here
def Get(msg): 
  return CURRENT_MSGS_[msg]
